				<!-- 右侧内容区域 我的借款账单 -->
				<div class="xf_mem_Account xf_mem_shzdjkb_box">
				<div class="xf_mem_shzdjkb_box_tcc">遮盖层</div>
					<h3 class="xf_mem_accout_title">修改密码</h3>
					<!-- 修改密码 -->
					<input type="hidden" id="encryString" name="encryString">
					<div class="xf_xgaq_pass_xg">
						<div class="xf_xgaq_pass_h3">
							修改登录密码
						</div>
						<table border="0" cellpadding="0" cellspacing="0" width="739" class="xf_xgaq_pass_h3_table">
							<tr>
								<td align="right" width="110">请输入原密码：</td>
								<td><input type="password" id="oldPassword" class="xf_xgaq_pass_pad" onclick="showSafeQuestion();"> <span class="xf_xgaq_pass_padnr">密码由6-20位字符组成(不含空格)</span></td>
							</tr>
							<tr>
								<td align="right">请输入新密码：</td>
								<td><input type="password" id="newPassword1" class="xf_xgaq_pass_pad" onclick="showSafeQuestion();"></td>
							</tr>
							<tr>
								<td align="right">确认新密码：</td>
								<td><input type="password" id="newPassword2" class="xf_xgaq_pass_pad" onclick="showSafeQuestion();"></td>
							</tr>
							<tr>
								<td>&nbsp;</td>
								<td><a class="xf_con_inputfbjk" id="loginPwd">确定修改</a></td>
							</tr>
						</table>
					</div>
					<!-- 修改交易密码 -->
						#{if user?.payPassword == '' || user?.payPassword == null}
						   <div class="xf_xgaq_pass_xg">
						<div class="xf_xgaq_pass_h3">
							添加交易密码
						</div>
						<table border="0" cellpadding="0" cellspacing="0" width="739" class="xf_xgaq_pass_h3_table">
							<tr>
								<td align="right">请输入密码：</td>
								<td><input type="password" id="addPayPassword1" class="xf_xgaq_pass_pad" onclick="showSafeQuestion();"><span class="xf_xgaq_pass_padnr">密码由6-20位字符组成(不含空格)</span></td>
							</tr>
							<tr>
								<td align="right">确认密码：</td>
								<td><input type="password" id="addPayPassword2" class="xf_xgaq_pass_pad" onclick="showSafeQuestion();"></td>
							</tr>
							<tr>
								<td>&nbsp;</td>
								<td class="xf_con_inputfbjk_xg">
									<a class="xf_con_inputfbjk" id="addDealPwd">添加交易密码</a>
								</td>
							</tr>
						</table>
						</div>
						#{/if}
						#{else}
						<div class="xf_xgaq_pass_xg" id="update">
							<div class="xf_xgaq_pass_h3">
								修改交易密码
							</div>
							<table border="0" cellpadding="0" cellspacing="0" width="739" class="xf_xgaq_pass_h3_table">
								<tr>
									<td align="right" width="110">请输入原密码：</td>
									<td><input type="password" id="oldPayPassword" class="xf_xgaq_pass_pad" onclick="showSafeQuestion();"> <span class="xf_xgaq_pass_padnr">密码由6-20位字符组成(不含空格)</span></td>
								</tr>
								<tr>
									<td align="right">请输入新密码：</td>
									<td><input type="password" id="newPayPassword1" class="xf_xgaq_pass_pad" onclick="showSafeQuestion();"></td>
								</tr>
								<tr>
									<td align="right">确认新密码：</td>
									<td><input type="password" id="newPayPassword2" class="xf_xgaq_pass_pad" onclick="showSafeQuestion();"></td>
								</tr>
								<tr>
									<td>&nbsp;</td>
									<td class="xf_con_inputfbjk_xg">
										<a class="xf_con_inputfbjk" id="dealPwd">确定修改</a>
										<a class="xf_xgmm_fbjk_xg" onClick="dealPass()">找回交易密码？</a>
									</td>
								</tr>
							</table>
						</div>
						#{/else}
				</div>
				
<script type="text/javascript">
     $(function(){
     
          $(".xf_mem_shzdjkb_box_tcc").show();
     
          $("#loginPwd").click(function(){
          		
				if(!$("#xf_mem_aqwtsz_tc").is(':hidden')){
						alert("请先回答密保问题");
						return false;
				}
				
          		var oldPassword = $("#oldPassword").val();
          		var newPassword1 = $("#newPassword1").val();
          		var newPassword2 = $("#newPassword2").val();
          		
          		if($.trim(oldPassword) == ""){
          			alert("请输入原密码");
          			return;
          		}
          		if($.trim(newPassword1) == ""){
          			alert("请输入新密码");
          			return;
          		}
          		if($.trim(newPassword1).length < 6 || $.trim(newPassword1).length > 20){
          			alert("密码长度为6-20位字符(不含空格)");
          			return;
              	}
          		if($.trim(newPassword2) == ""){
          			alert("请输入确认密码密码");
          			return;
          		}
          		if(equals(newPassword1,oldPassword)){
          			alert("新密码与原密码一样，请重新输入");
          			return;
                }
          		if($.trim(newPassword1) != $.trim(newPassword2)){
          			alert("两次输入的新密码不一致");
          			return;
          		}
          		
                var savePassword = #{jsAction @savePassword(':oldPassword', ':newPassword1', ':newPassword2',':encryString')/}
				$.post(savePassword({oldPassword:oldPassword, newPassword1:newPassword1,
				newPassword2:newPassword2,encryString:$("#encryString").val()}),function(data){
				    var arr=eval(data);
				    if(arr.error.code < 0) {
				    	alert(arr.error.msg);
				    	return;
				    }
				    alert(arr.error.msg);
				    window.location.href="@{front.account.LoginAndRegisterAction.login()}";
			 });
          })
     
          $("#dealPwd").click(function(){
          		if(!$("#xf_mem_aqwtsz_tc").is(':hidden')){
						alert("请先回答密保问题");
						return false;
				}
          
          		var oldPayPassword = $("#oldPayPassword").val();
          		var newPayPassword1 = $("#newPayPassword1").val();
          		var newPayPassword2 = $("#newPayPassword2").val();
          		
          		if($.trim(oldPayPassword) == ""){
          			alert("请输入原密码");
          			return;
          		}
          		if($.trim(newPayPassword1) == ""){
          			alert("请输入新密码");
          			return;
          		}
          		if($.trim(newPayPassword1).length < 6 || $.trim(newPayPassword1).length > 20){
          			alert("密码长度为6-20位字符(不含空格)");
          			return;
              	}
          		if($.trim(newPayPassword2)  == ""){
          			alert("请输入确认密码密码");
          			return;
          		}
          		if(equals(oldPayPassword,newPayPassword1)){
          			alert("新密码与原密码一样，请重新输入");
          			return;
                }
          		if($.trim(newPayPassword1) != $.trim(newPayPassword2)){
          			alert("两次输入的新密码不一致");
          			return;
          		}

                var editPayPassword = #{jsAction @editPayPassword(':oldPayPassword', ':newPayPassword1', ':newPayPassword2',':encryString')/}
				$.post(editPayPassword({oldPayPassword:oldPayPassword, newPayPassword1:newPayPassword1,
				newPayPassword2:newPayPassword2,encryString:$("#encryString").val()}),function(data){
					var arr = eval(data);
					
					if(arr.error.code < 0){
					     alert(arr.error.msg);
					     return;
					}
					
					alert(arr.error.msg);
					window.location.href="@{basicInformation()}";
			 });
          })
     
          $("#addDealPwd").click(function(){
          		if(!$("#xf_mem_aqwtsz_tc").is(':hidden')){
						alert("请先回答密保问题");
						return false;
				     }
          		var addPayPassword1 = $("#addPayPassword1").val();
          		var addPayPassword2 = $("#addPayPassword2").val();
          		
          		if($.trim(addPayPassword1) == ""){
          			alert("请输入交易密码");
          			return;
          		}
          		if($.trim(addPayPassword1).length < 6 || $.trim(addPayPassword1).length > 20){
          			alert("密码长度为6-20位字符(不含空格)");
          			return;
              	}
          		if($.trim(addPayPassword2)  == ""){
          			alert("请输入确认密码密码");
          			return;
          		}
          		if($.trim(addPayPassword1) != $.trim(addPayPassword2)){
          			alert("两次输入的新密码不一致");
          			return;
          		}
				                                                                                           
                var savePayPassword = #{jsAction @savePayPassword(':newPayPassword1', ':newPayPassword2',':encryString')/}
				$.post(savePayPassword({newPayPassword1:$("#addPayPassword1").val(), newPayPassword2:$("#addPayPassword2").val()
				,encryString:$("#encryString").val()}),function(data){
					 var arr = eval(data);
					 
                     if(arr.error.code < 0){
					     alert(arr.error.msg);
					     return;
					}
					
					alert(arr.error.msg);
					window.location.href="@{basicInformation()}";
			 });
          })
     })

         function dealPass(){
            showDiv($("#xf_mem_aqwtsz_tc_dealPass"));
         }
</script>		
				